

<template>
	<div>
		<nav>
            <a class="nav-zuo" href="#/myde">
                <i class="fa fa-angle-left"></i>
            </a>
                待收货
        </nav>
		<div class="sortlist">
			<!--{{datas}}-->
            <!--<div v-for="data in datas" class="div">-->
                <!--{{data}}-->
                <ul>
                    <li v-for="(shop,index) in datas">
                        <!--{{shop}}-->
                        <img :src="`http://localhost:2222/images/photos/${shop.productImage}`" alt="">
                        <div class="nei">
                        <h2> {{shop.name}}<span> {{shop.checked}}</span></h2>
                        <p> {{shop.describe}}</p>
                        <p>价格: <span>¥  {{shop.yuanPrice}}</span></p>
                        <a class="upda" @click.prevent = "recei(index)">确认收货</a>
                    </div>
                    </li>
                </ul>
            <!--</div>-->
		</div>
	</div>
</template>

<script>
	import axios from 'axios'
	export default {
		data:function(){
			return {
				datas:'',
				lists:[],
			}
		},
		components:{
			
		},
		mounted:function(){
			var that = this;
            axios.get('los/receving').then((resData)=>{
                // console.log(resData)
                this.datas = resData.data.message;
            }).catch((error)=>{
                console.log(error);
            })
			
		},
		methods:{
			recei:function(index){
                console.log(index);
                axios.post('los/receving',{ins:index}).then((resData)=>{
                    console.log('已确认收货')
                    location.reload();
                }).catch((error)=>{
                    console.log(error);
                })
            }
		}
	}
	
	
</script>

<style scoped>
	
	.sortlist{
		overflow: hidden;
        margin-top: 45px;
	}

    nav{
        padding: 0 15px;
        text-align: center;
        position: fixed;
        right: 0;
        left: 0;
        top: 0;
        z-index: 666;
        /*overflow: hidden;*/
        line-height: 45px;
        font-size: 16px;
        color: #fff;
        border-bottom: 1px solid #ccc;
        background:#FA8072;
    }
    nav > a{
        font-size: 30px;
        color: #fff;
    }
    .nav-zuo{
      float: left;
      margin-top: -2px;
    }
	


     .nei a{
        position: absolute;
        right: 10px;
        color: #fff;
        border-radius: 3px;
        padding: 0 4px;
    }
    .nei > p {
        font-size: 12px;
    }
    .nei > p > span{
        color: #cc0000;
        font-size: 16px;
    }
    .nei{
        float: left;
        font-size: 14px;
        width: 180px;
    }
    .nei h2{
        font-size: 16px;
        font-weight: 500;
    }
    .nei h2 span{
        font-size: 14px;
        margin-left: 15px;
    }
    li img{
        float: left;
        width: 25%;
        margin-right: 15px;
    }
    li{
        overflow: hidden;
        padding: 10px;
        position: relative;
        border-bottom: 1px solid #ccc;
    }
    .div{
        border-bottom: 10px solid #ccc;
    }
    .content{
        margin-top: 45px;
    }
    .upda{
        background: #1E90FF;
        bottom: 10px;
    }
</style>




















